import request from '@/utils/request'

// 封装获取角色列表的请求
export const getRoleList = data => request.get('/sys/role', { params: data })

// 封装删除角色的请求
export const delRoleList = data => request.delete(`/sys/role/${data}`)

// 封装新增接口
export const addRoleList = data => request.post('/sys/role', data)

// 封装获取指定角色详情接口
export const fetchRoleDetail = id => request.get(`/sys/role/${id}`)

// 封装修改角色详情
export const updateRole = data => request.put(`/sys/role/${data.id}`, data)

// 封装 给角色分配权限的请求
export const assignPrem = data => request.put('/sys/role/assignPrem', data)
